{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "413439cf-360f-435b-acfe-4b1cc9042773",
   "metadata": {},
   "source": [
    "# Refactoring the class-based implementation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "36cd43c4-9df2-40cf-a4f0-66e660af7035",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Generating data\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "np.random.seed(0)\n",
    "p_t, n = 100, 260\n",
    "stock_df = pd.DataFrame({f'Stock {i}': p_t + np.round(np.random.standard_normal(n).cumsum(), 2) for i in range(10)})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bde0b4dd-96bf-441c-a7b1-3e4ab37cd7c5",
   "metadata": {},
   "outputs": [],
   "source": [
    "from my_application import MyApplication"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e04c0045-f815-4c7b-a0a4-dee9c004275a",
   "metadata": {},
   "outputs": [],
   "source": [
    "app = MyApplication(stock_df)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "widgets-tutorial",
   "language": "python",
   "name": "widgets-tutorial"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
